Adjust SELinux context for fbguard - #9084
Conversation
|
I see 2 problems with suggested changes. Install script will produce an error like: Changes done by chcon are temporary - if/when restorecon is used or a full filesystem relabel done changes made by chcon will be wiped out. May be better use semanage + restorecon ? |
| for FileName in fbguard | ||
| do | ||
| # check need fcontext | ||
| if [[ $(ls -Z / | grep usr | grep system_u:) ]]; then |
There was a problem hiding this comment.
Can you avoid use of bash extensions like '[['? We use /bin/sh to run install scripts cause bash may be not installed by default on some distros.
| else | ||
|
|
||
| echo "!!! SELinux context error: $(ls -Z ${fb_install_prefix}/bin/$FileName)" | ||
| echo "!!! Please install 'semanage' and 'restorecon' from 'policycoreutils-python(-utils)' and reinstall firebird \n for '$FileName' may be run as service." |
There was a problem hiding this comment.
Package can be named differently on different distro, mentioning what utilities are missing should be enough.
|
Artifact download URL: https://github.com/FirebirdSQL/firebird/actions/runs/30560791681/artifacts/8767096179 Install completed |
Porblem:
RHEL 10 now prevent start services from not-standard folders.
: firebird.service: Unable to locate executable '/opt/firebird/bin/fbguard': Permission denied
: firebird.service: Failed at step EXEC spawning /opt/firebird/bin/fbguard: Permission denied
/opt/.../fbgurad not work as service in RHEL10 but work in Debian 13
/usr/bin/.../fbgurad work service as expected
https://groups.google.com/g/firebird-devel/c/-7DmsSesg3E
Solution:
Add bin_t context to fbguard via chcon in install.sh
Test:
https://github.com/notesoft/SQLfb/tree/work-install.sh
Artifact download URL: https://github.com/notesoft/SQLfb/actions/runs/29092950440/artifacts/8227790862